package com.yiquan.user.dao.db;

import com.yiquan.user.pojo.ApplyUpdateUserDTO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Tyrone
 * @date 2022/4/30 18:21
 */
public interface UserIdentifyDao extends JpaSpecificationExecutor<ApplyUpdateUserDTO>, JpaRepository<ApplyUpdateUserDTO,Integer> {
    @Modifying
    @Query(nativeQuery = true,value = "update yiquan_user_apply set status = ?2 where id = ?1")
    @Transactional
    void updateUserIdentifyId(Integer id,Integer status);
}
